import * as bm from "/js/baseModule.js";

export class Module extends bm.baseModule {
    constructor(view) {
        super(view);

        //套餐详情渲染
        let data = globalData;
        this._SetService = new Vue({
            el: '.SetService_vue',
            data: {
                data: data,
                citys: '加载中...'
            }
        })
    }
    afterInstall() {
        let that = this;
        //加载模块时
        funs.getModuleFuns('modules/user/ServiceArea.js',function (mod) {
            let citys = mod.getSelectedProv();
            that.setProvString(citys);
        });
    }
    //设置关注的省份
    setProvString(prov) {
        let provString = '';
        for (let i = 0; i < prov.length; i++) {
            provString = provString + prov[i] + ' ';
        }
        this._SetService.citys = provString;
        this.find('.openProvs').attr('evt', "loadServiceArea");
    }

    _evt_loadServiceType(){
        location.hash = 'user/SetService/ServiceType';
    }
    _evt_loadServiceArea(){
        location.hash = 'user/SetService/ServiceArea';
    }

}